/* eslint-disable no-nested-ternary */
import { NameSpace } from 'utils';
const ns = NameSpace('auth');

export const APPLICATION_INFO_GET = ns('APPLICATION_INFO_GET');
export const AUTH_OWN_INFO_GET = ns('AUTH_OWN_INFO_GET');
export const AUTH_FINISHED_STATUS_CHANGE = ns('AUTH_FINISHED_STATUS_CHANGE');

export function changeAuthFinishedStatus(data) {
  return (dispatch) => {
    dispatch({
      type: AUTH_FINISHED_STATUS_CHANGE,
      data,
    });
  };
}

export function getAuthInfo(data) {
  return (dispatch) => {
    dispatch({
      type: AUTH_OWN_INFO_GET,
      data,
    });
  };
}
export function getApplicationInfo(data) {
  return (dispatch) => {
    dispatch({
      type: APPLICATION_INFO_GET,
      data,
    });
  };
}
